﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NJT.ValueConverter;

namespace NJT.Test.ValueConverter
{
    [TestClass]
    public class 秒ToTimeSpantest
    {



        [TestMethod]
        public void 秒ToTimeSpan_test()
        {
            var b = new 秒ToTimeSpan();

            Assert.AreEqual(TimeSpan.Zero, b.Convert(0d, typeof(TimeSpan), null, CultureInfo.CurrentCulture));

            Assert.AreEqual(TimeSpan.FromSeconds(30), b.Convert(30, typeof(TimeSpan), null, CultureInfo.CurrentCulture));

            Assert.AreEqual(TimeSpan.Zero, b.Convert("A", typeof(TimeSpan), null, CultureInfo.CurrentCulture));

        }
    }
}
